package com.moive.news.tqnewsapplication.utils;

import android.content.Context;
import android.graphics.Bitmap;
import android.widget.ImageView;

import com.bumptech.glide.Glide;
import com.bumptech.glide.request.target.GlideDrawableImageViewTarget;
import com.lzy.ninegrid.NineGridView;
import com.moive.news.tqnewsapplication.R;

/**
 * Created by Administrator on 2017/12/13.
 */

public class PicassoImageLoader implements  NineGridView.ImageLoader {
    @Override
    public void onDisplayImage(Context context, ImageView imageView, String url) {
        Glide.with(context)
                .load(url)
                .placeholder(R.drawable.icon)
                .error(R.drawable.icon)
                .into(new GlideDrawableImageViewTarget(imageView, 3));
    }
    @Override
    public Bitmap getCacheImage(String url) {
        return null;
    }
}
